<?php
namespace app\index\controller;



use think\Request;
use think\Db;

class Serve extends \think\Controller
{
    public function index()
    {
        //分类
        $id['Level']=2;

        $servelist=Db::table('product_cate')->where($id)->limit(11)->select();

        $this->assign('servelist',$servelist);

         // 内容
        $where['BusType']=1;

        $user=Db::table('product')->alias('p')
                                  ->where($where)
                                  ->field('p.ID,u.Name as username,u.Province,u.City,u.Area,u.AddressDis,u.Mobile,p.Business,p.DefaultImage')
                                  ->join('user u','p.AccountID = u.ID')
                                  ->order('p.ID desc')
                                  ->paginate(20);
                               
        $page = $user->render();

        $this->assign('page', $page);

        $this->assign('user',$user);

        return view();

    }




    public function servelist()
    {

       $id=input('id');

       $data=Db::table('product')->alias('p')
                                  ->where($where)
                                  ->field('p.ID,u.Name as username,u.Province,u.City,u.Area,u.AddressDis,u.Mobile,p.Business,p.DefaultImage,u.QQ')
                                  ->join('user u','p.AccountID = u.ID')
                                  ->order('p.ID desc')
                                  ->find($id);
        $this->assign('t',$data);

        return view();
    }

   



    public function make()
    {


    	return view();
    }
    





    public function show()
    {

    	return view();

    }






    public function detailcletail()
    {

    	return view();
    }


    public function cletail()
    {

      return view();
    }
public function field()
{

  return view();
}

public function fieldindex()
{


  $data=Db::table('supply')->limit(8)->order('ID desc')->select();

  $this->assign('data',$data);

  return view();
}
public function fieldlist()
{

  return view();
}

public function help()
{

  return view();
}

    

    }